﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HotelMatchUtility.Entity;

namespace HotelMatchUtility.Comparer
{
    public class Impl_HotelNameAndAddressExactComparer : HotelCompareBase, ICompareCondition
    {
        public Impl_HotelNameAndAddressExactComparer()
        {
            ConditionName = "【精确】[酒店名称]和[地址]相同";
            IsExactCondition = true;
            IsExclusiveCondition = true;
            TargetIsContinue = true;
        }

        public override bool DoCompare(HotelEntity hotelTarget, HotelEntity hotelToCompare)
        {
            return hotelTarget.HotelName.Length >= 10
                && hotelTarget.HotelNameContainsAndAddressContains(hotelToCompare);
        }
    }
}
